package cn.initcap.redis;

/**
 * @author initcap
 * @date 2018/8/8 PM8:51
 */
public class SeckillUserKey extends BasePrefix {

    public static final int TOKEN_EXPIRE = 3600 * 24 * 2;
    public static final SeckillUserKey TOKEN = new SeckillUserKey(TOKEN_EXPIRE, "tk");
    public static final SeckillUserKey GET_BY_ID = new SeckillUserKey(0, "id");
    private String prefix;

    private SeckillUserKey(int expireSeconds, String prefix) {
        super(expireSeconds, prefix);
        this.prefix = prefix;
    }

    public SeckillUserKey withExpire(int seconds) {
        return new SeckillUserKey(seconds, prefix);
    }
}
